package com.yuhanginfo.modules.web.web;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yuhanginfo.common.web.BaseController;
import com.yuhanginfo.modules.web.entity.WebArea;
import com.yuhanginfo.modules.web.service.WebAreaService;

/**
 * 区域Controller
 * @author yinhao
 * @version 2017-10-30
 */
@Controller
@RequestMapping(value = "${frontPath}/area")
public class WebAreaController extends BaseController {

	@Autowired
	private WebAreaService webAreaService;


	@RequestMapping(value = "getProvince",method = RequestMethod.POST)
	@ResponseBody
	public List<WebArea> getProvince() {
		//省
		return webAreaService.selectProvinceList();
	}
	
	@RequestMapping(value = "getCity",method = RequestMethod.POST)
	@ResponseBody
	public List<WebArea> getCity(String parentId) {
		//省
		return webAreaService.cityList(parentId);
	}
}